<?php
    include "admin_goods.php";

$id=$_REQUEST['id'];
$goodsimg=$_REQUEST['goodsimg'];
$goodsname=$_REQUEST['goodsname'];
$goodsnews=$_REQUEST['goodsnews'];
$price=$_REQUEST['price'];
$number=$_REQUEST['number'];
$shop=$_REQUEST['shop'];
$area=$_REQUEST['area'];
var_dump($id,$goodsimg,$goodsname,$goodsnews,$price,$number,$shop,$area,$enddate);

mysqli_select_db($conn,"shopping");

   $sql = "update goods set goodsimg='$goodsimg',goodsname='$goodsname',goodsnews='$goodsnews',
   price='$price',number='$number',shop='$shop',area='$area' where id='$id'";  //SQL模板

   $result=mysqli_query($conn,$sql);

    if (!$result){
        echo '数据更新失败！';
    }else{
        echo '数据更新成功！';
    }
    
    mysqli_close($conn);
?>
